<!--
 * @FileDescription: 设备列表
 * @Author: 周沿江
 * @Date: 2021/6/25
 * @LastEditors: 周沿江
 -->
<template>
  <div>
    <div class="crumbs">
      <el-breadcrumb separator="/">
        <el-breadcrumb-item><i class="el-icon-lx-cascades"></i> 设备信息管理</el-breadcrumb-item>
        <el-breadcrumb-item>设备信息列表</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <el-card>
          <task_table ref="undo_task_table" :show_submit_button="'none'" :table_height="500" :show_export_button="'none'" @get_selection_result="get_selection_result"></task_table>
    </el-card>
  </div>
</template>
<script>
import task_table from '../../module/base_table';
export default {
  components: {
    task_table
  },
  data() {
    return {
      submit_table_data:"",
      is_user_define: 'none',
      button_swi: false,
      form: {
        analy_model: '推荐配置',
        task_name: '111',
        platform: '',
        spider_interval_time: '',
        datetimerange: '',
        crawl_frequency: 999,
        keyword_list: '',
      },

      column: [{
        "title": "设备编号",
        "field": "uuid",
        "addition": false,
      }, {
        "title": "操作系统",
        "field": "caption",
        "addition": false,
      }, {
        "title": "操作系统位数",
        "field": "osarchitecture",
        "addition": false,
      }, {
        "title": "设备名称",
        "field": "csname",
        "addition": false,
      }],
    }
  },
  created() {
    this.init_table();
  },
  methods: {
    /**
     * 表格数据初始化
     * @returns {Promise<void>}
     */
    async init_table() {
      var data = await this.$http.get('/device/selectAll');
      this.$refs.undo_task_table.init(data, this.column)
    },
    /**
     * 获取多选结果
     * @param multipleSelection
     */
    get_selection_result(multipleSelection){
      this.submit_table_data=multipleSelection;
    }

  }
}
</script>

